home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-06-10 | 1.1 KB | 71 lines | [TEXT/MPS ] |
- ; Sample program to crash QuickDraw with Polygon operation
- ; Original by Jean-Paul Harmand
- ; Transcribed to MPW by Joel West for MacTutor, 6/10/88
- ;
- ; Build using:
- ; CreateMake PolyTest PolyTest.a
- ; BuildProgram PolyTest
- ;
- Print OFF
- Include 'Traps.a'
- ; Include 'ToolEqu.a'
- Include 'QuickEqu.a'
- ; Include 'SysEqu.a'
- Print ON
-
- QuickDraw RECORD ,DECREMENT
- thePort DS.L 1
- white DS.B 8
- black DS.B 8
- gray DS.B 8
- ltGray DS.B 8
- dkGray DS.B 8
- arrow DS.B cursRec
- screenBits DS.B bitmapRec
- randSeed DS.L 1
- ORG -grafSize
- ENDR
-
-
- MAIN
- PolyLen EQU $001E
-
- WITH QuickDraw
- PEA thePort
- _InitGraf
- _InitFonts
- _InitWindows
- _InitMenus
- CLR.L -(SP)
- _InitDialogs
- _TEInit
- _InitCursor
- MOVE.L #PolyLen,D0
- _NewHandle
-
- MOVE.L A0,A2
- MOVE.L (A0),A0
- LEA PolyValues,A1
- MOVE.W #PolyLen/2,D0
- @1 MOVE.W (A1)+,(A0)+
- DBRA D0,@1
-
- MOVE.L A2,-(SP)
- PEA WhitePattern
- _FillPoly
- _ExitToShell
-
- WhitePattern
- DC.L 0,0
- PolyValues
- DC.W PolyLen
- DC.W $FD20,$FDC3,$165C,$07EE
- DC.W $165C,$07EE
- DC.W $1170,$02B4
- DC.W $02FF,$0021
- DC.W $FD20,$FDC3
- DC.W $165C,$07EE
- ENDMAIN
-
- END
-